package single

import (
	"gitee.com/ichub/goconfig/common/base/baseiface"
	"gitee.com/ichub/goconfig/common/basedi"
)

const singleNameSingleEntity = "SingleEntity"

// init
// register
// load
func init() {
	registerBeanSingleEntity()
}

// register SingleEntity
func registerBeanSingleEntity() {
	basedi.RegisterLoadBean(singleNameSingleEntity, LoadSingleEntity)
}

func FindBeanSingleEntity() *SingleEntity {
	return basedi.FindBean(singleNameSingleEntity).(*SingleEntity)
}

func LoadSingleEntity() baseiface.ISingleton {
	return NewSingleEntity()
}
